package cn.isjinhao.crws.sql.grammar;

import cn.isjinhao.crws.sql.lexical.token.Token;

import java.util.List;

/**
 * @Author ISJINHAO
 * @Date 2021/3/29 20:21
 */
public class Function extends CurdStatement {

    private Token method;

    private List<CurdStatement> parameterList;

    public Function(Token method, List<CurdStatement> parameterList) {
        this.method = method;
        this.parameterList = parameterList;
    }

    public Function(Token method) {
        this.method = method;
    }

    @Override
    public <R> R accept(CurdStatementVisitor<R> curdStatementVisitor) {
        return curdStatementVisitor.visitFunction(this);
    }

    public Token getMethod() {
        return method;
    }

    public List<CurdStatement> getParameterList() {
        return parameterList;
    }
}
